using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialStatisticsTools._MappingClusters
{
    /// <summary>
    /// <para>Grouping Analysis</para>
    /// <para>Groups features based on feature attributes and optional spatial or temporal constraints.</para>
    /// <para>根据要素属性和可选的空间或时间约束对要素进行分组。</para>
    /// </summary>    
    [DisplayName("Grouping Analysis")]
    public class GroupingAnalysis : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GroupingAnalysis()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Features">
        /// <para>Input Features</para>
        /// <para>The feature class or feature layer for which you want to create groups.</para>
        /// <para>要为其创建群组的要素类或要素图层。</para>
        /// </param>
        /// <param name="_Unique_ID_Field">
        /// <para>Unique ID Field</para>
        /// <para>An integer field containing a different value for every feature in the input feature class. If you don't have a Unique ID field, you can create one by adding an integer field to your feature class table and calculating the field values to equal the FID or OBJECTID field.</para>
        /// <para>一个整数字段，其中包含输入要素类中每个要素的不同值。如果没有唯一 ID 字段，则可以通过向要素类表添加整数字段并计算字段值以等于 FID 或 OBJECTID 字段来创建一个字段。</para>
        /// </param>
        /// <param name="_Output_Feature_Class">
        /// <para>Output Feature Class</para>
        /// <para>The new output feature class created containing all features, the analysis fields specified, and a field indicating to which group each feature belongs.</para>
        /// <para>创建的新输出要素类包含所有要素、指定的分析字段以及指示每个要素所属组的字段。</para>
        /// </param>
        /// <param name="_Number_of_Groups">
        /// <para>Number of Groups</para>
        /// <para>The number of groups to create. The Output Report parameter will be disabled for more than 15 groups.</para>
        /// <para>要创建的组数。对于超过 15 个组，将禁用输出报告参数。</para>
        /// </param>
        /// <param name="_Analysis_Fields">
        /// <para>Analysis Fields</para>
        /// <para>A list of fields you want to use to distinguish one group from another. The Output Report parameter will be disabled for more than 15 fields.</para>
        /// <para>要用于区分一个组与另一个组的字段列表。对于超过 15 个字段，将禁用输出报告参数。</para>
        /// </param>
        /// <param name="_Spatial_Constraints">
        /// <para>Spatial Constraints</para>
        /// <para><xdoc>
        ///   <para>Specifies if and how spatial relationships among features should constrain the groups created.</para>
        ///   <bulletList>
        ///     <bullet_item>Contiguity edges only—Groups contain contiguous polygon features. Only polygons that share an edge can be part of the same group.</bullet_item><para/>
        ///     <bullet_item>Contiguity edges corners—Groups contain contiguous polygon features. Only polygons that share an edge or a vertex can be part of the same group.</bullet_item><para/>
        ///     <bullet_item>Delaunay triangulation—Features in the same group will have at least one natural neighbor in common with another feature in the group. Natural neighbor relationships are based on Delaunay Triangulation. Conceptually, Delaunay Triangulation creates a nonoverlapping mesh of triangles from feature centroids. Each feature is a triangle node and nodes that share edges are considered neighbors.</bullet_item><para/>
        ///     <bullet_item>K nearest neighbors—Features in the same group will be near each other; each feature will be a neighbor of at least one other feature in the group. Neighbor relationships are based on the nearest K features, where you specify an Integer value, K, for the Number of Neighbors parameter.</bullet_item><para/>
        ///     <bullet_item>Get spatial weights from file—Spatial, and optionally temporal, relationships are defined by a spatial weights file (.swm). Create the spatial weights matrix file using the Generate Spatial Weights Matrix tool or the Generate Network Spatial Weights tool.</bullet_item><para/>
        ///     <bullet_item>No spatial constraint—Features will be grouped using data space proximity only. Features do not have to be near each other in space or time to be part of the same group.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要素之间的空间关系是否以及如何约束创建的组。</para>
        ///   <bulletList>
        ///     <bullet_item>仅限毗连边 - 群组包含连续面要素。只有共享边的面才能属于同一组。</bullet_item><para/>
        ///     <bullet_item>连续性边角 - 组包含连续面要素。只有共享边或顶点的多边形才能属于同一组。</bullet_item><para/>
        ///     <bullet_item>Delaunay 三角剖分—同一组中的要素将至少具有一个与组中另一个要素相同的自然邻居。自然邻域关系基于德劳内三角测量。从概念上讲，Delaunay 三角剖分从特征质心创建三角形的非重叠网格。每个要素都是一个三角形节点，共享边的节点被视为相邻节点。</bullet_item><para/>
        ///     <bullet_item>K 最近邻—同一组中的要素将彼此靠近;每个要素将是组中至少一个其他要素的邻居。邻居关系基于最近的 K 要素，其中为邻居数参数指定一个整数值 K。</bullet_item><para/>
        ///     <bullet_item>从文件中获取空间权重 - 空间权重和时间关系（可选）由空间权重文件 （.swm） 定义。使用生成空间权重矩阵工具或生成网络空间权重工具创建空间权重矩阵文件。</bullet_item><para/>
        ///     <bullet_item>无空间约束 - 将仅使用数据空间邻近性对要素进行分组。要素不必在空间或时间上彼此靠近即可成为同一组的一部分。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public GroupingAnalysis(object _Input_Features, object _Unique_ID_Field, object _Output_Feature_Class, long _Number_of_Groups, List<object> _Analysis_Fields, _Spatial_Constraints_value? _Spatial_Constraints)
        {
            this._Input_Features = _Input_Features;
            this._Unique_ID_Field = _Unique_ID_Field;
            this._Output_Feature_Class = _Output_Feature_Class;
            this._Number_of_Groups = _Number_of_Groups;
            this._Analysis_Fields = _Analysis_Fields;
            this._Spatial_Constraints = _Spatial_Constraints;
        }
        public override string ToolboxName => "Spatial Statistics Tools";

        public override string ToolName => "Grouping Analysis";

        public override string CallName => "stats.GroupingAnalysis";

        public override List<string> AcceptEnvironments => ["MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZResolution", "ZTolerance", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "qualifiedFieldNames", "randomGenerator", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_Input_Features, _Unique_ID_Field, _Output_Feature_Class, _Number_of_Groups, _Analysis_Fields, _Spatial_Constraints.GetGPValue(), _Distance_Method.GetGPValue(), _Number_of_Neighbors, _Weights_Matrix_File, _Initialization_Method.GetGPValue(), _Initialization_Field, _Output_Report_File, _Evaluate_Optimal_Number_of_Groups.GetGPValue(), _Output_FStat, _Max_FStat_Group, _Max_FStat];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The feature class or feature layer for which you want to create groups.</para>
        /// <para>要为其创建群组的要素类或要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Features { get; set; }


        /// <summary>
        /// <para>Unique ID Field</para>
        /// <para>An integer field containing a different value for every feature in the input feature class. If you don't have a Unique ID field, you can create one by adding an integer field to your feature class table and calculating the field values to equal the FID or OBJECTID field.</para>
        /// <para>一个整数字段，其中包含输入要素类中每个要素的不同值。如果没有唯一 ID 字段，则可以通过向要素类表添加整数字段并计算字段值以等于 FID 或 OBJECTID 字段来创建一个字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Unique ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Unique_ID_Field { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The new output feature class created containing all features, the analysis fields specified, and a field indicating to which group each feature belongs.</para>
        /// <para>创建的新输出要素类包含所有要素、指定的分析字段以及指示每个要素所属组的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_Feature_Class { get; set; }


        /// <summary>
        /// <para>Number of Groups</para>
        /// <para>The number of groups to create. The Output Report parameter will be disabled for more than 15 groups.</para>
        /// <para>要创建的组数。对于超过 15 个组，将禁用输出报告参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Groups")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long _Number_of_Groups { get; set; }


        /// <summary>
        /// <para>Analysis Fields</para>
        /// <para>A list of fields you want to use to distinguish one group from another. The Output Report parameter will be disabled for more than 15 fields.</para>
        /// <para>要用于区分一个组与另一个组的字段列表。对于超过 15 个字段，将禁用输出报告参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Analysis Fields")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _Analysis_Fields { get; set; }


        /// <summary>
        /// <para>Spatial Constraints</para>
        /// <para><xdoc>
        ///   <para>Specifies if and how spatial relationships among features should constrain the groups created.</para>
        ///   <bulletList>
        ///     <bullet_item>Contiguity edges only—Groups contain contiguous polygon features. Only polygons that share an edge can be part of the same group.</bullet_item><para/>
        ///     <bullet_item>Contiguity edges corners—Groups contain contiguous polygon features. Only polygons that share an edge or a vertex can be part of the same group.</bullet_item><para/>
        ///     <bullet_item>Delaunay triangulation—Features in the same group will have at least one natural neighbor in common with another feature in the group. Natural neighbor relationships are based on Delaunay Triangulation. Conceptually, Delaunay Triangulation creates a nonoverlapping mesh of triangles from feature centroids. Each feature is a triangle node and nodes that share edges are considered neighbors.</bullet_item><para/>
        ///     <bullet_item>K nearest neighbors—Features in the same group will be near each other; each feature will be a neighbor of at least one other feature in the group. Neighbor relationships are based on the nearest K features, where you specify an Integer value, K, for the Number of Neighbors parameter.</bullet_item><para/>
        ///     <bullet_item>Get spatial weights from file—Spatial, and optionally temporal, relationships are defined by a spatial weights file (.swm). Create the spatial weights matrix file using the Generate Spatial Weights Matrix tool or the Generate Network Spatial Weights tool.</bullet_item><para/>
        ///     <bullet_item>No spatial constraint—Features will be grouped using data space proximity only. Features do not have to be near each other in space or time to be part of the same group.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要素之间的空间关系是否以及如何约束创建的组。</para>
        ///   <bulletList>
        ///     <bullet_item>仅限毗连边 - 群组包含连续面要素。只有共享边的面才能属于同一组。</bullet_item><para/>
        ///     <bullet_item>连续性边角 - 组包含连续面要素。只有共享边或顶点的多边形才能属于同一组。</bullet_item><para/>
        ///     <bullet_item>Delaunay 三角剖分—同一组中的要素将至少具有一个与组中另一个要素相同的自然邻居。自然邻域关系基于德劳内三角测量。从概念上讲，Delaunay 三角剖分从特征质心创建三角形的非重叠网格。每个要素都是一个三角形节点，共享边的节点被视为相邻节点。</bullet_item><para/>
        ///     <bullet_item>K 最近邻—同一组中的要素将彼此靠近;每个要素将是组中至少一个其他要素的邻居。邻居关系基于最近的 K 要素，其中为邻居数参数指定一个整数值 K。</bullet_item><para/>
        ///     <bullet_item>从文件中获取空间权重 - 空间权重和时间关系（可选）由空间权重文件 （.swm） 定义。使用生成空间权重矩阵工具或生成网络空间权重工具创建空间权重矩阵文件。</bullet_item><para/>
        ///     <bullet_item>无空间约束 - 将仅使用数据空间邻近性对要素进行分组。要素不必在空间或时间上彼此靠近即可成为同一组的一部分。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Spatial Constraints")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _Spatial_Constraints_value? _Spatial_Constraints { get; set; }

        public enum _Spatial_Constraints_value
        {
            /// <summary>
            /// <para>Contiguity edges only</para>
            /// <para>Contiguity edges only—Groups contain contiguous polygon features. Only polygons that share an edge can be part of the same group.</para>
            /// <para>仅限毗连边 - 群组包含连续面要素。只有共享边的面才能属于同一组。</para>
            /// </summary>
            [Description("Contiguity edges only")]
            [GPEnumValue("CONTIGUITY_EDGES_ONLY")]
            _CONTIGUITY_EDGES_ONLY,

            /// <summary>
            /// <para>Contiguity edges corners</para>
            /// <para>Contiguity edges corners—Groups contain contiguous polygon features. Only polygons that share an edge or a vertex can be part of the same group.</para>
            /// <para>连续性边角 - 组包含连续面要素。只有共享边或顶点的多边形才能属于同一组。</para>
            /// </summary>
            [Description("Contiguity edges corners")]
            [GPEnumValue("CONTIGUITY_EDGES_CORNERS")]
            _CONTIGUITY_EDGES_CORNERS,

            /// <summary>
            /// <para>Delaunay triangulation</para>
            /// <para>Delaunay triangulation—Features in the same group will have at least one natural neighbor in common with another feature in the group. Natural neighbor relationships are based on Delaunay Triangulation. Conceptually, Delaunay Triangulation creates a nonoverlapping mesh of triangles from feature centroids. Each feature is a triangle node and nodes that share edges are considered neighbors.</para>
            /// <para>Delaunay 三角剖分—同一组中的要素将至少具有一个与组中另一个要素相同的自然邻居。自然邻域关系基于德劳内三角测量。从概念上讲，Delaunay 三角剖分从特征质心创建三角形的非重叠网格。每个要素都是一个三角形节点，共享边的节点被视为相邻节点。</para>
            /// </summary>
            [Description("Delaunay triangulation")]
            [GPEnumValue("DELAUNAY_TRIANGULATION")]
            _DELAUNAY_TRIANGULATION,

            /// <summary>
            /// <para>K nearest neighbors</para>
            /// <para>K nearest neighbors—Features in the same group will be near each other; each feature will be a neighbor of at least one other feature in the group. Neighbor relationships are based on the nearest K features, where you specify an Integer value, K, for the Number of Neighbors parameter.</para>
            /// <para>K 最近邻—同一组中的要素将彼此靠近;每个要素将是组中至少一个其他要素的邻居。邻居关系基于最近的 K 要素，其中为邻居数参数指定一个整数值 K。</para>
            /// </summary>
            [Description("K nearest neighbors")]
            [GPEnumValue("K_NEAREST_NEIGHBORS")]
            _K_NEAREST_NEIGHBORS,

            /// <summary>
            /// <para>Get spatial weights from file</para>
            /// <para>Get spatial weights from file—Spatial, and optionally temporal, relationships are defined by a spatial weights file (.swm). Create the spatial weights matrix file using the Generate Spatial Weights Matrix tool or the Generate Network Spatial Weights tool.</para>
            /// <para>从文件中获取空间权重 - 空间权重和时间关系（可选）由空间权重文件 （.swm） 定义。使用生成空间权重矩阵工具或生成网络空间权重工具创建空间权重矩阵文件。</para>
            /// </summary>
            [Description("Get spatial weights from file")]
            [GPEnumValue("GET_SPATIAL_WEIGHTS_FROM_FILE")]
            _GET_SPATIAL_WEIGHTS_FROM_FILE,

            /// <summary>
            /// <para>No spatial constraint</para>
            /// <para>No spatial constraint—Features will be grouped using data space proximity only. Features do not have to be near each other in space or time to be part of the same group.</para>
            /// <para>无空间约束 - 将仅使用数据空间邻近性对要素进行分组。要素不必在空间或时间上彼此靠近即可成为同一组的一部分。</para>
            /// </summary>
            [Description("No spatial constraint")]
            [GPEnumValue("NO_SPATIAL_CONSTRAINT")]
            _NO_SPATIAL_CONSTRAINT,

        }

        /// <summary>
        /// <para>Distance Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how distances are calculated from each feature to neighboring features.</para>
        ///   <bulletList>
        ///     <bullet_item>Euclidean—The straight-line distance between two points (as the crow flies)</bullet_item><para/>
        ///     <bullet_item>Manhattan—The distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何计算从每个要素到相邻要素的距离。</para>
        ///   <bulletList>
        ///     <bullet_item>欧几里得 - 两点之间的直线距离（乌鸦飞翔时）</bullet_item><para/>
        ///     <bullet_item>曼哈顿 - 沿直角轴测量的两点之间的距离（城市街区）;通过将 x 坐标和 y 坐标之间的（绝对）差求和计算得出</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Distance_Method_value _Distance_Method { get; set; } = _Distance_Method_value._EUCLIDEAN;

        public enum _Distance_Method_value
        {
            /// <summary>
            /// <para>Euclidean</para>
            /// <para>Euclidean—The straight-line distance between two points (as the crow flies)</para>
            /// <para>欧几里得 - 两点之间的直线距离（乌鸦飞翔时）</para>
            /// </summary>
            [Description("Euclidean")]
            [GPEnumValue("EUCLIDEAN")]
            _EUCLIDEAN,

            /// <summary>
            /// <para>Manhattan</para>
            /// <para>Manhattan—The distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates</para>
            /// <para>曼哈顿 - 沿直角轴测量的两点之间的距离（城市街区）;通过将 x 坐标和 y 坐标之间的（绝对）差求和计算得出</para>
            /// </summary>
            [Description("Manhattan")]
            [GPEnumValue("MANHATTAN")]
            _MANHATTAN,

        }

        /// <summary>
        /// <para>Number of Neighbors</para>
        /// <para>This parameter is enabled whenever the Spatial Constraints parameter is K nearest neighbors or one of the contiguity methods (Contiguity edges only or Contiguity edges corners). The default number of neighbors is 8 and cannot be smaller than 2 for K nearest neighbors. This value reflects the exact number of nearest neighbor candidates to consider when building groups. A feature will not be included in a group unless one of the other features in that group is a K nearest neighbor. The default for Contiguity edges only and Contiguity edges corners is 0. For the contiguity methods, this value reflects the minimum number of neighbor candidates to consider. Additional nearby neighbors for features with less than the Number of Neighbors specified will be based on feature centroid proximity.</para>
        /// <para>每当空间约束参数为 K 最近邻或邻接方法之一（仅邻接边或邻接边角）时，将启用此参数。默认的邻居数为 8，对于 K 个最近邻，不能小于 2。此值反映了构建组时要考虑的最近邻候选项的确切数量。除非该组中的其他要素之一是 K 最近邻，否则该要素不会包含在组中。仅“连续性边”和“连续性”边角的默认值为 0。对于邻接方法，此值反映了要考虑的最小邻域候选项数。对于小于指定相邻点数的要素，其他邻近邻居将基于要素质心邻近性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Neighbors")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _Number_of_Neighbors { get; set; } = 8;


        /// <summary>
        /// <para>Weights Matrix File</para>
        /// <para>The path to a file containing spatial weights that define spatial relationships among features.</para>
        /// <para>包含定义要素之间空间关系的空间权重的文件的路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weights Matrix File")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Weights_Matrix_File { get; set; } = null;


        /// <summary>
        /// <para>Initialization Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how initial seeds are obtained when the Spatial Constraint parameter selected is No spatial constraint. Seeds are used to grow groups. If you indicate you want three groups, for example, the analysis will begin with three seeds.</para>
        ///   <bulletList>
        ///     <bullet_item>Find seed locations—Seed features will be selected to optimize performance.</bullet_item><para/>
        ///     <bullet_item>Get seeds from field—Nonzero entries in the Initialization Field will be used as starting points to grow groups.</bullet_item><para/>
        ///     <bullet_item>Use random seeds—Initial seed features will be randomly selected.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定当所选空间约束参数为“无空间约束”时如何获取初始种子。种子用于培养群体。例如，如果您指示需要三个组，则分析将从三个种子开始。</para>
        ///   <bulletList>
        ///     <bullet_item>查找种子位置 - 将选择种子要素以优化性能。</bullet_item><para/>
        ///     <bullet_item>从字段获取种子 - 初始化字段中的非零条目将用作增长组的起点。</bullet_item><para/>
        ///     <bullet_item>使用随机种子—将随机选择初始种子要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Initialization Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Initialization_Method_value _Initialization_Method { get; set; } = _Initialization_Method_value._FIND_SEED_LOCATIONS;

        public enum _Initialization_Method_value
        {
            /// <summary>
            /// <para>Find seed locations</para>
            /// <para>Find seed locations—Seed features will be selected to optimize performance.</para>
            /// <para>查找种子位置 - 将选择种子要素以优化性能。</para>
            /// </summary>
            [Description("Find seed locations")]
            [GPEnumValue("FIND_SEED_LOCATIONS")]
            _FIND_SEED_LOCATIONS,

            /// <summary>
            /// <para>Get seeds from field</para>
            /// <para>Get seeds from field—Nonzero entries in the Initialization Field will be used as starting points to grow groups.</para>
            /// <para>从字段获取种子 - 初始化字段中的非零条目将用作增长组的起点。</para>
            /// </summary>
            [Description("Get seeds from field")]
            [GPEnumValue("GET_SEEDS_FROM_FIELD")]
            _GET_SEEDS_FROM_FIELD,

            /// <summary>
            /// <para>Use random seeds</para>
            /// <para>Use random seeds—Initial seed features will be randomly selected.</para>
            /// <para>使用随机种子—将随机选择初始种子要素。</para>
            /// </summary>
            [Description("Use random seeds")]
            [GPEnumValue("USE_RANDOM_SEEDS")]
            _USE_RANDOM_SEEDS,

        }

        /// <summary>
        /// <para>Initialization Field</para>
        /// <para>The numeric field identifying seed features. Features with a value of 1 for this field will be used to grow groups.</para>
        /// <para>标识种子要素的数值字段。此字段的值为 1 的要素将用于增长组。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Initialization Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Initialization_Field { get; set; } = null;


        /// <summary>
        /// <para>Output Report File</para>
        /// <para>The full path for the PDF report file to be created summarizing group characteristics. This report provides a number of graphs to help you compare the characteristics of each group. Creating the report file can add substantial processing time.</para>
        /// <para>要创建的 PDF 报告文件的完整路径，汇总了组特征。此报告提供了许多图表，以帮助您比较每个组的特征。创建报告文件可能会增加大量的处理时间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Report File")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Output_Report_File { get; set; } = null;


        /// <summary>
        /// <para>Evaluate Optimal Number of Groups</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the tool will assess the optimal number of groups, 2 through 15.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Groupings from 2 to 15 will be evaluated.</bullet_item><para/>
        ///     <bullet_item>Unchecked—No evaluation of the number of groups will be performed. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定该工具是否将评估最佳组数（2 到 15）。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—将评估 2 到 15 之间的分组。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不执行组数评估。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Evaluate Optimal Number of Groups")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Evaluate_Optimal_Number_of_Groups_value _Evaluate_Optimal_Number_of_Groups { get; set; } = _Evaluate_Optimal_Number_of_Groups_value._false;

        public enum _Evaluate_Optimal_Number_of_Groups_value
        {
            /// <summary>
            /// <para>EVALUATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EVALUATE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_EVALUATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_EVALUATE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>F Statistic</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("F Statistic")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public double? _Output_FStat { get; set; }


        /// <summary>
        /// <para>Maximum F Statistic Group</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum F Statistic Group")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long? _Max_FStat_Group { get; set; }


        /// <summary>
        /// <para>Maximum F Statistic</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum F Statistic")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public double? _Max_FStat { get; set; }


        public GroupingAnalysis SetEnv(object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZResolution = null, object ZTolerance = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, object randomGenerator = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZResolution: ZResolution, ZTolerance: ZTolerance, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, randomGenerator: randomGenerator, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}